/**
 * 添加或者修改页面 Add or Edit Page
 */
var WhOutOrderDetailedInfoDlg = {
    data: {
        detailedFactory: "",
        detailedOutNumber: "",
        detailedGoodscode: "",
        detailedGoodsId: "",
        detailedGoodsname: "",
        detailedPutbalenum: "",
        detailedNumber: "",
        detailedWeight: "",
        detailedOutWeight: "",
        detailedVolume: "",
        detailedOutVolume: "",
        detailedPrice: "",
        detailedMoney: "",
        detailedBatchnumber: "",
        detailedDate: "",
        detailedRebubbles: "",
        detailedPacking: "",
        detailedLargeclass: "",
        detailedGoodstype: "",
        detailedPutcondition: "",
        detailedNote: "",
        version: "",
        createTime: "",
        updateTime: "",
        createUser: "",
        updateUser: "",
        goodsUnit: "",
        goodsSpecs: "",
        goodsNo: ""
    }
};

layui.use(['form', 'admin', 'ax'], function () {
    var $ = layui.jquery;
    var $ax = layui.ax;
    var form = layui.form;
    var admin = layui.admin;

    //让当前iframe弹层高度适应 Adjust iframe height
    admin.iframeAuto();

    //表单提交事件 Form submission event
    form.on('submit(btnSubmit)', function (data) {
        var ajax = new $ax(Feng.ctxPath + "/whOutOrderDetailed/addItem", function (data) {
            Feng.success("添加成功！Add successful!");
            window.location.href = Feng.ctxPath + '/whOutOrderDetailed'
        }, function (data) {
            Feng.error("添加失败！Add failed!" + data.responseJSON.message)
        });
        ajax.set(data.field);
        ajax.start();

        return false;
    });

    //返回按钮 Back button
    $("#backupPage").click(function () {
        window.location.href = Feng.ctxPath + '/whOutOrderDetailed'
    });

});